OpenBaseDatabase Class

Used to open an OpenBase database.

Events

None

Properties

Encoding


Methods

None

More information available in parent classes: Database:Object


Notes

In order to use this class, you must install the appropriate database plug-in in your plugins folder.

The set of database plug-ins is included on the REALbasic CD, but you may find more recent versions at the REAL Software web site, www.realsoftware.com.

If you use the RecordSet class to update a record using edit and update you need to include the primary key column of the table. If you don't, OpenBase won't be able to find the record in order to update it.

Caution: Inserting data into Object fields in OpenBase can corrupt the database. The workaround for this is to insert the record without the object fields and then use the Update method to add the data for the object fields.


Example

The following code opens the OpenBase database, "pubs." The Host property can also be an IP address.

Dim obdb as OpenBaseDatabase
Obdb = New OpenBaseDatabase
Obdb.host = "opendb.mydomain.com"
Obdb.databasename = "pubs"
Obdb.Username="Sam"
Obdb.Password="Caveman"
If obdb.connect then
 //proceed with database operations
Else
  MsgBox "Failed to connect."
end if


See Also

Database, DatabaseField, RecordSet classes.